<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>人物管理系统</title>
		<link th:href="@{/css/page.css}" rel="stylesheet" type="text/css" />
		<link th:href="@{/css/css_admin.css}" rel="stylesheet" type="text/css" />
		<link th:href="@{/css/style.css}" rel="stylesheet" type="text/css" />
		<script type="text/javascript" th:src="@{/webjars/jquery/3.2.1/jquery.min.js}"></script>
		<style>
			.tab1{border:1px solid #ddd}
			.tab1 td{border:1px solid #ddd}
			.tab1 th{border:1px solid #ddd}
			.tab1 .input2{height:24px; line-height:24px; border:1px solid #ddd; background:#f5f5f5; padding:0 5px; width:200px}
		</style>
</head>
<body>
  <div id="content_add" class="content_top" align="center">
  	<form>  	
  		<input type="hidden" name="id" id="id" th:value="${user.id}"/>	
  		<table border="1" cellpadding="0" cellspacing="0" class="tablelist">
   			<tr style="height:30px">
   				<td class="td_add_1" align="right" style="width:150px">用户名(<font color="red">*</font>):</td>
   				<td class="td_add_2" align="left">
   					<input type="text" id="username" name="username" th:value="${user.username}" class="inputreadonly" readonly="readonly" maxlength="50"/>
   					(用户名最少3个字符最多50个字符)
   				</td>
   			</tr>
   			<tr style="height:30px">
   				<td class="td_add_1" align="right">密码(<font color="red">*</font>):</td>
   				<td class="td_add_2" align="left">
   					<input type="password" id="password" name="password" th:value="${user.password}" />
   				</td>
   			</tr>
   			<tr style="height:30px">
   				<td class="td_add_1" align="right">真实姓名(<font color="red">*</font>):</td>
   				<td class="td_add_2" align="left">
   					<input type="text" id="truename" name="truename" th:value="${user.truename}" />
   				</td>
   			</tr>
   			<tr style="height:30px">
   				<td class="td_add_1" align="right">证件号码(<font color="red">*</font>):</td>
   				<td class="td_add_2" align="left">
   					<input type="text" id="sfzh" name="sfzh" th:value="${user.sfzh}" />
   				</td>
   			</tr>
   			<tr style="height:30px">
   				<td class="td_add_1" align="right">单位信息:</td>
   				<td class="td_add_2" align="left">
   					<textarea style="width:70%;height:100px" id="department" name="department" maxlength="500" th:text="${user.department}"></textarea>
   				</td>
   			</tr>
   			<tr style="height:30px">
   				<td class="td_add_1" align="right">联系电话:</td>
   				<td class="td_add_2" align="left">
   					<input type="text" id="telephone" name="telephone" th:value="${user.telephone}" />
   				</td>
   			</tr>
   			<tr style="height:30px">
   				<td class="td_add_1" align="right">邮箱:</td>
   				<td class="td_add_2" align="left">
   					<input type="text" id="email" name="email" th:value="${user.email}" />
   				</td>
   			</tr>
   			<tr style="height:30px">
   				<td class="td_add_1" align="right">角色:</td>
   				<td class="td_add_2" align="left">
   					<span th:each="entity,iterStat:${roles}">  
   						<input type="checkbox" name="role" class="role" style="width:10px;" th:id="${entity.rolename}" th:value="${entity.rolename}"
   							 th:checked="${#arrays.contains(user.role, entity.rolename)}?true:false"
   						></input>
				   		 <label th:for="${entity.rolename}" th:text="${entity.memo}"></label>
				    </span> 
                   
   				</td>
   			</tr>
   			<tr style="height:50px">
   				<td colspan="2">
					<button type="button" class="btn btn-success  btn-sm"  style="width:80px" onClick="addOrUpdateUser">确定</button> &nbsp; &nbsp;
					<button type="reset" class="btn btn-default  btn-sm"  style="width:80px" >重置</button>
   				</td>
   			</tr>
		</table>
	</form>
  </div>
</body>
</html>